CREATE TABLE [dbo].[TCMOBA_DETR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[AA_BNCO] [dbo].[TD_VC_004] NOT NULL,
[MM_BNCO] [dbo].[TD_VC_002] NOT NULL,
[TI_MOVI_BANC] [dbo].[TD_VC_001] NOT NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NOT NULL,
[FE_OPER] [dbo].[TD_DT_001] NULL,
[NU_OPER_DETR] [dbo].[TD_VC_020] NULL,
[FE_PAGO_DETR] [dbo].[TD_DT_001] NULL,
[NO_ARCH_DETR] [dbo].[TD_VC_100] NULL,
[IM_TOTA_DETR] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TCMOBA_DE__IM_TO__719CDDE7] DEFAULT ((0)),
[ST_VALI] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TCMOBA_DE__ST_VA__72910220] DEFAULT ('N'),
[ST_PROC] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TCMOBA_DE__ST_PR__74794A92] DEFAULT ('N'),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TCMOBA_DE__CO_US__76619304] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TCMOBA_DE__FE_US__7755B73D] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TCMOBA_DE__CO_US__7849DB76] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TCMOBA_DE__FE_US__793DFFAF] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCMOBA_DETR] WITH NOCHECK ADD CONSTRAINT [CK__TCMOBA_DE__ST_PR__756D6ECB] CHECK NOT FOR REPLICATION (([ST_PROC]='N' OR [ST_PROC]='S'))
GO
ALTER TABLE [dbo].[TCMOBA_DETR] WITH NOCHECK ADD CONSTRAINT [CK__TCMOBA_DE__ST_VA__73852659] CHECK NOT FOR REPLICATION (([ST_VALI]='N' OR [ST_VALI]='S'))
GO
ALTER TABLE [dbo].[TCMOBA_DETR] ADD CONSTRAINT [PK__TCMOBA_D__2A92D8891D913A15] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCMOBA_DETR] ADD CONSTRAINT [FK__TCMOBA_DETR__0A344CDE] FOREIGN KEY ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC]) REFERENCES [dbo].[TCMOVI_BANC] ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC])
GO
